<%@ page import="databeans.*"%>
<%
	Employee employee = (Employee)session.getAttribute("employee");
	String employeeUsername = employee.getUsername();
	String employeeFirstName = employee.getFirstName();
	String employeeLastName = employee.getLastName();
%>
<jsp:include page="../common/header.jsp" />



<title>Carnegie Financial Services - Employee Manager</title>
</head>

<body>
	<div id="container">
    	<div id="header">
        	<h2>Carnegie Financial Services</h2>
    		<jsp:include page="../common/top-menu.jsp" />
      	</div>
        <div id="wrapper">
        	<div id="content">
              <div id="box">
	            	<h3>Deposit a Check</h3>
	                <form id="form" action="employeeDepositCheck.do" method="post" class="user-form">
						<jsp:include page="../common/messages.jsp"/>
						<label for="txtFirstName">Customer : </label>
						<%
							Customer[] customers = (Customer[])request.getAttribute("customers");
							if(customers!=null)
							{
								int cid = Integer.parseInt((String)request.getAttribute("txtCustomerID"));
								
						%>
						<select name="txtCustomerID" class="label-long" tabindex="1">
							<option value="" <%if(cid == 0) out.print("selected=\"selected\""); %>>Choose Customer</option>
							<% for(int i = 0;i<customers.length;i++) {%>
							<option value="<%=customers[i].getCustomerID() %>" <%if(cid == customers[i].getCustomerID()) out.print("selected=\"selected\""); %>><%=customers[i].getCustomerID() + " - " + customers[i].getFirstName() + " " + customers[i].getLastName() %></option>
							<%} %>
						</select>
						<%  }else 
							out.println("No customers in Database");
						%>
						<br /><br />
						<label for="txtAmount">Amount : </label>
						<input name="txtAmount" id="txtAmount" type="text" tabindex="2" value="${txtAmount}"/>
						<br />
						<div align="center">
							<input id="create-emp" type="submit" name="Submit" value="Deposit Check" tabindex="3" /> 
							<input id="cancel" type="reset" tabindex="4" value="Cancel" name="Submit"/>
						</div>
	                </form>
	                <div class="create-emp-result"></div>
                </div>

            </div>

            <jsp:include page="../common/sidebar.jsp" />
      </div>
        <jsp:include page="../common/footer.jsp" />
</div>
<div id="popup" ></div>
</body>

<%@page import="model.CustomerDAO"%></html>
